package com.irs.irsforum.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.sql.Timestamp;
/**
 * @author Liyihui
 * @Date: 2020/3/22
 * @Time: 3:09
 */
@Data
public class IndexPost {
    private Long id;
    private String title;
    private Long userId;
    private Timestamp creationTime;
    private Long favoriteNum;
    private Long replyNum;
    private Long subjectId;
    private Long problemId;

    private String userNickName;

    private String subjectName;

    private String problemName;

    /** 1：推荐 0:不推荐*/
    private Integer isRecommend = 0;

    /**1: 发送者 0;非发送者*/
    private Integer isSender = 0;

    /**1:收藏 0:未收藏 */
    private Integer isFavorite = 0;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Timestamp getCreationTime() {
        return creationTime;
    }

    @Override
    public String toString() {
        return "{" +
                "id=" + id + '}';
    }
}
